home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3n / t_open.z / t_open
Encoding:
Text File  |  1998-10-20  |  16.1 KB  |  265 lines

  1.  
  2.  
  3.  
  4. tttt____ooooppppeeeennnn((((3333NNNN))))                                                          tttt____ooooppppeeeennnn((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _tttt______oooo_pppp_eeee_nnnn - establish a transport endpoint
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_ffff_dddd_eeee_ffff ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_xxxx_tttt_iiii_...._hhhh_>>>>
  14.      _####_eeee_llll_ssss_eeee
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_uuuu_ssss_eeee_rrrr_...._hhhh_>>>>
  16.      _####_eeee_nnnn_dddd_iiii_ffff
  17.  
  18.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ffff_cccc_nnnn_tttt_llll_...._hhhh_>>>>
  19.  
  20.      _iiii_nnnn_tttt _tttt______oooo_pppp_eeee_nnnn _((((_cccc_hhhh_aaaa_rrrr _pppp_aaaa_tttt_hhhh_,,,, _iiii_nnnn_tttt _oooo_ffff_llll_aaaa_gggg_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt______iiii_nnnn_ffff_oooo _****_iiii_nnnn_ffff_oooo_))))_;;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _tttt______oooo_pppp_eeee_nnnn must be called as the first step in the initialization of a
  24.      transport endpoint.  This function establishes a transport endpoint by
  25.      opening a UNIX file that identifies a particular transport provider (that
  26.      is, transport protocol) and returning a file descriptor that identifies
  27.      that endpoint.  For example, opening the file _////_dddd_eeee_vvvv_////_iiii_ssss_oooo______cccc_oooo_tttt_ssss identifies an
  28.      OSI connection-oriented transport layer protocol as the transport
  29.      provider.
  30.  
  31.      _pppp_aaaa_tttt_hhhh points to the path name of the file to open, and _oooo_ffff_llll_aaaa_gggg identifies
  32.      any open flags [as in _oooo_pppp_eeee_nnnn(2)].  _oooo_ffff_llll_aaaa_gggg may be constructed from _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY
  33.      or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK _OOOO_RRRR-ed with _OOOO______RRRR_DDDD_WWWW_RRRR.  These flags are defined in the header
  34.      file _<<<<_ffff_cccc_nnnn_tttt_llll_...._hhhh_>>>>.  _tttt______oooo_pppp_eeee_nnnn returns a file descriptor that will be used by
  35.      all subsequent functions to identify the particular local transport
  36.      endpoint.
  37.  
  38.      _tttt______oooo_pppp_eeee_nnnn also returns various default characteristics of the underlying
  39.      transport protocol by setting fields in the _tttt______iiii_nnnn_ffff_oooo structure.  The _tttt______iiii_nnnn_ffff_oooo
  40.      argument points to a _tttt______iiii_nnnn_ffff_oooo structure that contains the following
  41.      members:
  42.  
  43.      _llll_oooo_nnnn_gggg _aaaa_dddd_dddd_rrrr_;;;;/* maximum size of the transport protocol address */
  44.      _llll_oooo_nnnn_gggg _oooo_pppp_tttt_iiii_oooo_nnnn_ssss_;;;;/* maximum number of bytes of protocol-specific options */
  45.      _llll_oooo_nnnn_gggg _tttt_ssss_dddd_uuuu_;;;;/* maximum size of a transport service data unit (_TTTT_SSSS_DDDD_UUUU) */
  46.      _llll_oooo_nnnn_gggg _eeee_tttt_ssss_dddd_uuuu_;;;;/* maximum size of an expedited transport service data unit (_EEEE_TTTT_SSSS_DDDD_UUUU) */
  47.      _llll_oooo_nnnn_gggg _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt_;;;;/* maximum amount of data allowed on connection establishment
  48.                    functions */
  49.      _llll_oooo_nnnn_gggg _dddd_iiii_ssss_cccc_oooo_nnnn_;;;;/* maximum amount of data allowed on _tttt______ssss_nnnn_dddd_dddd_iiii_ssss and _tttt______rrrr_cccc_vvvv_dddd_iiii_ssss
  50.                    functions */
  51.      _llll_oooo_nnnn_gggg _ssss_eeee_rrrr_vvvv_tttt_yyyy_pppp_eeee_;;;;/* service type supported by the transport provider */
  52.  
  53.      _####_iiii_ffff_dddd_eeee_ffff ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE
  54.      _llll_oooo_nnnn_gggg _ffff_llll_aaaa_gggg_ssss_;;;;/* other info about the transport provider */
  55.      _####_eeee_nnnn_dddd_iiii_ffff
  56.  
  57.      The values of the fields have the following meanings:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tttt____ooooppppeeeennnn((((3333NNNN))))                                                          tttt____ooooppppeeeennnn((((3333NNNN))))
  71.  
  72.  
  73.  
  74.      _aaaa_dddd_dddd_rrrr          A value greater than or equal to zero indicates the maximum
  75.                    size of a transport protocol address; a value of -1
  76.                    specifies that there is no limit on the address size; and a
  77.                    value of -2 specifies that the transport provider does not
  78.                    provide user access to transport protocol addresses.
  79.  
  80.      _oooo_pppp_tttt_iiii_oooo_nnnn_ssss       A value greater than or equal to zero indicates the maximum
  81.                    number of bytes of protocol-specific options supported by
  82.                    the provider; a value of -1 specifies that there is no
  83.                    limit on the option size; and a value of -2 specifies that
  84.                    the transport provider does not support user-settable
  85.                    options.
  86.  
  87.      _tttt_ssss_dddd_uuuu          A value greater than zero specifies the maximum size of a
  88.                    transport service data unit (_TTTT_SSSS_DDDD_UUUU); a value of zero
  89.                    specifies that the transport provider does not support the
  90.                    concept of _TTTT_SSSS_DDDD_UUUU, although it does support the sending of a
  91.                    data stream with no logical boundaries preserved across a
  92.                    connection; a value of -1 specifies that there is no limit
  93.                    on the size of a _TTTT_SSSS_DDDD_UUUU; and a value of -2 specifies that the
  94.                    transfer of normal data is not supported by the transport
  95.                    provider.
  96.  
  97.      _eeee_tttt_ssss_dddd_uuuu         A value greater than zero specifies the maximum size of an
  98.                    expedited transport service data unit (_EEEE_TTTT_SSSS_DDDD_UUUU); a value of
  99.                    zero specifies that the transport provider does not support
  100.                    the concept of _EEEE_TTTT_SSSS_DDDD_UUUU, although it does support the sending
  101.                    of an expedited data stream with no logical boundaries
  102.                    preserved across a connection; a value of -1 specifies that
  103.                    there is no limit on the size of an _EEEE_TTTT_SSSS_DDDD_UUUU; and a value of
  104.                    -2 specifies that the transfer of expedited data is not
  105.                    supported by the transport provider.
  106.  
  107.      _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt       A value greater than or equal to zero specifies the maximum
  108.                    amount of data that may be associated with connection
  109.                    establishment functions; a value of -1 specifies that there
  110.                    is no limit on the amount of data sent during connection
  111.                    establishment; and a value of -2 specifies that the
  112.                    transport provider does not allow data to be sent with
  113.                    connection establishment functions.
  114.  
  115.      _dddd_iiii_ssss_cccc_oooo_nnnn        A value greater than or equal to zero specifies the maximum
  116.                    amount of data that may be associated with the _tttt______ssss_nnnn_dddd_dddd_iiii_ssss and
  117.                    _tttt______rrrr_cccc_vvvv_dddd_iiii_ssss functions; a value of -1 specifies that there is
  118.                    no limit on the amount of data sent with these abortive
  119.                    release functions; and a value of -2 specifies that the
  120.                    transport provider does not allow data to be sent with the
  121.                    abortive release functions.
  122.  
  123.      _ssss_eeee_rrrr_vvvv_tttt_yyyy_pppp_eeee      This field specifies the service type supported by the
  124.                    transport provider, as described below.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. tttt____ooooppppeeeennnn((((3333NNNN))))                                                          tttt____ooooppppeeeennnn((((3333NNNN))))
  137.  
  138.  
  139.  
  140.      _ffff_llll_aaaa_gggg_ssss         If ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE is defined, then this structure element
  141.                    will exist.  This is a bit field used to specify other
  142.                    information about the transport provider.  If the
  143.                    T_SENDZERO bit is set in _ffff_llll_aaaa_gggg_ssss, this indicates that the
  144.                    underlying transport provider supports the sending of
  145.                    zero-length TSDUs.  Following is a dicussion of the
  146.                    separate issue of zero-length fragments within a _TTTT_SSSS_DDDD_UUUU.
  147.                    Sending data of zero octets:
  148.  
  149.                    The transport service definition, both in connection-
  150.                    oriented mode and in connectionless mode, does not permit
  151.                    sending a _TTTT_SSSS_DDDD_UUUU of zero octets.  So, in connectionless mode,
  152.                    if the _llll_eeee_nnnn parameter is set to zero, the _tttt______ssss_nnnn_dddd_uuuu_dddd_aaaa_tttt_aaaa() call
  153.                    will always return unsuccessfully with _----_1111 and _tttt______eeee_rrrr_rrrr_nnnn_oooo set
  154.                    to _TTTT_BBBB_AAAA_DDDD_DDDD_AAAA_TTTT_AAAA.  In connection-oriented mode, if the _nnnn_bbbb_yyyy_tttt_eeee_ssss
  155.                    parameter is set to zero, the _tttt______ssss_nnnn_dddd() call will return with
  156.                    _----_1111 and _tttt______eeee_rrrr_rrrr_nnnn_oooo set to _TTTT_BBBB_AAAA_DDDD_DDDD_AAAA_TTTT_AAAA if either the T_MORE flag is
  157.                    set or the T_MORE flag is not set and the preceding _tttt______ssss_nnnn_dddd()
  158.                    call completed a _TTTT_SSSS_DDDD_UUUU or _EEEE_TTTT_SSSS_DDDD_UUUU (that is, the call has
  159.                    requested sending a zero byte _TTTT_SSSS_DDDD_UUUU or _EEEE_TTTT_SSSS_DDDD_UUUU.
  160.  
  161.      If a transport user is concerned with protocol independence, the above
  162.      sizes may be accessed to determine how large the buffers must be to hold
  163.      each piece of information.  Alternatively, the _tttt______aaaa_llll_llll_oooo_cccc function may be
  164.      used to allocate these buffers.  An error will result if a transport user
  165.      exceeds the allowed data size on any function.
  166.  
  167.      The _ssss_eeee_rrrr_vvvv_tttt_yyyy_pppp_eeee field of _iiii_nnnn_ffff_oooo may specify one of the following values on
  168.      return:
  169.  
  170.      _TTTT______CCCC_OOOO_TTTT_SSSS        The transport provider supports a connection-mode service
  171.                    but does not support the optional orderly release facility.
  172.  
  173.      _TTTT______CCCC_OOOO_TTTT_SSSS______OOOO_RRRR_DDDD    The transport provider supports a connection-mode service
  174.                    with the optional orderly release facility.
  175.  
  176.      _TTTT______CCCC_LLLL_TTTT_SSSS        The transport provider supports a connectionless-mode
  177.                    service.  For this service type, _tttt______oooo_pppp_eeee_nnnn will return -2 for
  178.                    _eeee_tttt_ssss_dddd_uuuu, _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt, and _dddd_iiii_ssss_cccc_oooo_nnnn.
  179.  
  180.      A single transport endpoint may support only one of the above services at
  181.      one time.
  182.  
  183.      If _iiii_nnnn_ffff_oooo is set to _NNNN_UUUU_LLLL_LLLL by the transport user, no protocol information is
  184.      returned by _tttt______oooo_pppp_eeee_nnnn.
  185.  
  186.      This function resides within both the X/Open compliant _llll_iiii_bbbb_xxxx_nnnn_eeee_tttt and the
  187.      SVR4 compliant _llll_iiii_bbbb_nnnn_ssss_llll Network Services libraries.  Network Services
  188.      applications which require X/Open compliance must link-load with _----_llll_xxxx_nnnn_eeee_tttt.
  189.      Network Services applications which require SVR4 compliance must link-
  190.      load with _----_llll_nnnn_ssss_llll.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. tttt____ooooppppeeeennnn((((3333NNNN))))                                                          tttt____ooooppppeeeennnn((((3333NNNN))))
  203.  
  204.  
  205.  
  206.      On failure, _tttt______eeee_rrrr_rrrr_nnnn_oooo may be set to the following:
  207.  
  208.      _TTTT_SSSS_YYYY_SSSS_EEEE_RRRR_RRRR             A system error has occurred during execution of this
  209.                          function.
  210.  
  211.      _TTTT_BBBB_AAAA_DDDD_FFFF_LLLL_AAAA_GGGG            An invalid flag is specified.
  212.  
  213.      _TTTT_BBBB_AAAA_DDDD_NNNN_AAAA_MMMM_EEEE            If ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE is defined, then when an invalid
  214.                          transport provider name is encountered, this value is
  215.                          returned within _tttt______eeee_rrrr_rrrr_nnnn_oooo.
  216.  
  217. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  218.      _tttt______oooo_pppp_eeee_nnnn returns a valid file descriptor on success and -1 on failure and
  219.      _tttt______eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  220.  
  221. NNNNOOOOTTTTEEEESSSS
  222.      If _tttt______oooo_pppp_eeee_nnnn is used on a non-TLI-conforming STREAMS device, unpredictable
  223.      events may occur.
  224.  
  225. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  226.      _oooo_pppp_eeee_nnnn(2)
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.